<form [formGroup]="taxFormGroup">
  <div class="tw-grid tw-grid-cols-12 tw-gap-4">
    <div class="tw-col-span-6">
      <bit-form-field>
        <bit-label>{{ "country" | i18n }}</bit-label>
        <bit-select formControlName="country" autocomplete="country" data-testid="country">
          <bit-option
            *ngFor="let country of countryList"
            [value]="country.value"
            [disabled]="country.disabled"
            [label]="country.name"
          ></bit-option>
        </bit-select>
      </bit-form-field>
    </div>
    <div class="tw-col-span-6">
      <bit-form-field>
        <bit-label>{{ "zipPostalCode" | i18n }}</bit-label>
        <input
          bitInput
          type="text"
          formControlName="postalCode"
          autocomplete="postal-code"
          data-testid="postal-code"
        />
      </bit-form-field>
    </div>
    <div class="tw-col-span-6" *ngIf="isTaxSupported">
      <bit-form-field>
        <bit-label>{{ "address1" | i18n }}</bit-label>
        <input
          bitInput
          type="text"
          formControlName="line1"
          autocomplete="address-line1"
          data-testid="address-line1"
        />
      </bit-form-field>
    </div>
    <div class="tw-col-span-6" *ngIf="isTaxSupported">
      <bit-form-field>
        <bit-label>{{ "address2" | i18n }}</bit-label>
        <input
          bitInput
          type="text"
          formControlName="line2"
          autocomplete="address-line2"
          data-testid="address-line2"
        />
      </bit-form-field>
    </div>
    <div class="tw-col-span-6" *ngIf="isTaxSupported">
      <bit-form-field>
        <bit-label for="addressCity">{{ "cityTown" | i18n }}</bit-label>
        <input
          bitInput
          type="text"
          formControlName="city"
          autocomplete="address-level2"
          data-testid="city"
        />
      </bit-form-field>
    </div>
    <div class="tw-col-span-6" *ngIf="isTaxSupported">
      <bit-form-field>
        <bit-label>{{ "stateProvince" | i18n }}</bit-label>
        <input
          bitInput
          type="text"
          formControlName="state"
          autocomplete="address-level1"
          data-testid="state"
        />
      </bit-form-field>
    </div>
    <div class="tw-col-span-6" *ngIf="isTaxSupported && showTaxIdField">
      <bit-form-field>
        <bit-label>{{ "taxIdNumber" | i18n }}</bit-label>
        <input bitInput type="text" formControlName="taxId" data-testid="tax-id" />
      </bit-form-field>
    </div>
  </div>
</form>
